<style>
.page-goods-detail .seckill-container .seckill-list2 .fui-list-inner .text.timer span {
    background: #FF4444;
	font-weight:bold;
	font-size:0.7rem;
}
.fui-tab.fui-tab-danger a.active {
    border-color: #FF4444;
}
.label-success {
    background-color: #FF4444;
}
.jylabel-success {
    border: 1px solid #FF4444;
    color: #FF4444;
}
.fee-tag-zi {
    background: linear-gradient(to right,rgba(255,68,68,1),rgba(255,162,162,1));
    color: #fff;
    width: auto;
    font-weight: 400;
    font-size: 0.6rem;
}
.btn.btn-danger-o {
    color: #fff;
    border: 1px solid #fff;
}
</style>
<div class='fui-page fui-page-current'>
	<div class='fui-content member-page'>
			<div class="page-goods-detail" style="margin:0;">
					<div ng-class="{'seckill-container':1,'notstart':!pagedata.team.rest_time}" style="background:#e8fcf8">
						<div class="fui-list seckill-list1" style="background:#FF4444;width:70%">
							<div class="fui-list-inner">
								<div class="text bold">最小参与<span style="font-size:1.5rem">{{pagedata.team.pluginset.he_minjifen || 0}}</span>个积分</div>
								<div ng-if="pagedata.team.pluginset.he_ontime.start && pagedata.team.pluginset.he_ontime.end" class="text">活动时间：{{pagedata.team.pluginset.he_ontime.start}}点~{{pagedata.team.pluginset.he_ontime.end}}点</div>
								<div ng-if="!pagedata.team.pluginset.he_ontime.start || !pagedata.team.pluginset.he_ontime.end" class="text">活动时间：全天时间段</div>
							</div>
						</div>
						<div ng-if="pagedata.team.rest_time" class="fui-list seckill-list2" style="background:#e8fcf8;width:5rem">
							<div class="fui-list-inner">
								<div class="text " style="color:red">距开奖还有</div>
								<div class="text timer" style="color:red" ng-init="tool.time_down(pagedata.team.rest_time)">
									<span class="time-hour">{{pagedata.team.rest_time.hour}}</span>&nbsp;:&nbsp;<span class="time-min">{{pagedata.team.rest_time.minute}}</span>&nbsp;:&nbsp;<span class="time-sec">{{pagedata.team.rest_time.second}}</span>
								</div>
								<div class="gray c" style="font-size: 0.6rem">每{{pagedata.team.pluginset.he_i||'无'}}分钟一轮</div>
							</div>
						</div>
						<div ng-if="!pagedata.team.rest_time" class="fui-list seckill-list2" style="background:#999">
							<div class="fui-list-inner">
								<div class="text" style="color:#666">{{pagedata.team.statustitle}}</div>
							</div>
						</div>
					</div>
			</div>
			<div style="padding:0.5rem">
			<style>
			.fui-icon-group .fui-icon-col-sm.border {
			   border: 1px solid #FF4444;
			}
			.fui-cellone-icon{color:#FF4444;padding-right:0.5rem;line-height:1.5}
			.fui-icon-group .fui-icon-col-sm .icon{font-size:1.5rem;line-height:1.5}
			</style>
			<div class="fui-icon-group new noborder col-2" style="background:#fff;margin-bottom:0.5rem">
				<div class="fui-icon-col-sm border" style="margin-top:0">
					<div class="fui-cellone" style="padding:0">
					<div class="fui-cellone-icon r" style="width:40%"><i class="icon icon-jifen"></i></div>
					<div class="fui-cellone-text l">
						<div class="title bold">奖品1</div>
						<div class="gray" style="font-size:0.7rem">获得银豆</div>
					</div>
					</div>
				</div>
				<div class="fui-icon-col-sm border" style="margin-top:0">
					<div class="fui-cellone" style="padding:0">
					<div class="fui-cellone-icon r" style="width:40%"><i class="icon icon-jifen"></i></div>
					<div class="fui-cellone-text l">
						<div class="title bold">奖品2</div>
						<div class="gray" style="font-size:0.7rem">获得金豆</div>
					</div>
					</div>
				</div>
			</div>
				<div class='fui-cell-group-o' style="padding-bottom:0.5rem;">
					<div class='fui-cell-title' style="color:red;font-size:0.6rem;padding:0">【参与抽盲盒说明】:{{pagedata.tips}}</div>
					<div class="fui-icon-group noborder col-3" style="background:none;margin-top:0.3rem">
						<div ng-repeat="item in pagedata.team.reward" class="fui-icon-col-sm" style="margin:0;padding:0.2rem">
							<div class="btn btn-success-o" style="line-height:1.4;margin:0;padding:0;width:100%">
								<div class="icon">
									<img style="width:3.5rem;height:3.5rem" ng-src="{{tomedia(pagedata.team.pluginset.he_img) || '../addons/jy_manghe/resource/images/icon.png'}}"/>
								</div>
								<div class="badge" style="position: absolute;left:0.2rem;top:0.2rem">{{$index+1}}</div>
								<div style="position: absolute;right:0.2rem;top:0.2rem">
									<input type="checkbox" name="checkbox" ng-checked="item.isxuan" ng-click="toogle(item,'isxuan')" class="fui-radio fui-radio-danger edit-item del_history"/>
								</div>
								<!--<div class="bold">盲盒{{$index+1}}</div>-->
								<div class="gray" style="font-size:12px;">您已投{{item.isjifen}}个</div>
								<div class='fui-cellone' style="padding: 0.2rem">
									<div class='fui-cellone-info'>
										<input type='text' class='fui-input' ng-change="pagedata.upjifen()" style="width:100%;padding:0.1rem;border-radius:0.3rem;background: #f2f2f2;font-size: 0.6rem" placeholder="投入积分额度" ng-model="item.addjifen">
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="weui_btn_area" style="padding: 0.5rem;margin:0">
						<div class="c" style="font-size:0.6rem;margin-top:-0.3rem;color:red">
							投入总积分：{{pagedata.post.alljifen||0}}个
						</div>
						<div ng-if="pagedata.team.status==1" class="row" style="margin:0.5rem 0;">
							<div class="jy-2">
								<div style="padding:0 0.2rem;">
									<a class='weui_btn weui_btn_f60' style="border-radius:1rem;background-color:#f60;" ng-click="pagedata.topost2show()">一键拆盲盒</a>
								</div>
							</div>
							<div class="jy-2">
								<div style="padding:0 0.2rem;">
									<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#18bc9c;" ng-click="pagedata.topost()">自选拆盲盒</a>
								</div>
							</div>
						</div>
						<div ng-if="pagedata.team.status!=1" class="row" style="margin:0.5rem 0;">
							<a class='weui_btn weui_btn_default' style="border-radius:1rem;background-color:#18bc9c;">{{pagedata.team.statustitle}}</a>
						</div>
					</div>
				</div>
			<div class="fui-tab fui-tab-danger">
				<a ng-class="{'external active':pagedata.showcanlog == '0'}" href="javascript:" ng-click="pagedata.showcanlog=0;">活动详情</a>
				<a ng-class="{'external active':pagedata.showcanlog == '1'}" href="javascript:" ng-click="pagedata.showcanlog=1;tool.get_list('jy_manghe/game/getlist/',true);">我参与记录</a>
				<a ng-class="{'external active':pagedata.showcanlog == '2'}" href="javascript:" ng-click="pagedata.showcanlog=2;tool.get_list('jy_manghe/xunibi/fenlist/gameid='+pagedata.team.id,true);">我获奖记录</a>
			</div>
			<!--商品详情开始-->
			<div ng-if="pagedata.showcanlog==0" class="detail-block" style="position: relative;margin-top:0.5rem;border-radius: 0.5rem;width:100%;background:#fff;padding-bottom:0">
					<div class="content-block content-images" style="padding:0.5rem" ng-bind-html="trust(pagedata.team.content)"></div>
			</div>
			<div ng-if="pagedata.showcanlog!=0">
				<div class='fui-list-group container'>
					<div class="fui-list goods-item" ng-repeat="item in pagedata.list">
						<div ng-if="pagedata.showcanlog==1" class="fui-list-media">
							<img ng-src="{{tomedia(item.member.avatar) ||'../core/resource/images/nopic.jpg'}}" class="round" style="width:2rem;height:2rem">
						</div>
						<div class="fui-list-inner">
							<div ng-if="pagedata.showcanlog==1" class='title'>{{item.member.nickname}}</div>
							<div class='red'><span ng-if="pagedata.showcanlog==2">{{item.typetitle}}</span> {{item.fee}}个</div>
							<div ng-if="pagedata.showcanlog==1" class='title'>{{item.day}}第{{item.dayno}}期</div>
							<div ng-if="pagedata.showcanlog==2" class='title'>{{item.remark}}</div>
							<div class='gray' style="font-size:0.55rem">
							时间：{{item.createtime}}
							</div>
						</div>
					</div>
				</div>
				<div class='content-empty' ng-show="!pagedata.list || pagedata.list.length<=0">
					<i class='fa fa-comment-o'></i><br/>暂时没有任何记录!
				</div>
			</div>
			
	</div>
</div>
	<div ng-if="pagedata.post2show" class="popup">
		<div class="popup-body">
			<div class="popup-center" style="background:#FF4444">
				<style>
					.fui-cellone .fui-cellone-info {
						font-size: 0.85rem;
					}
				</style>
				<i class="closed icon icon-cuowu" ng-click="pagedata.post2show=false"></i>
				<div class='fui-cell-group-o' style="margin:0.5rem 1rem;padding-top:0.5rem;background:#FF4444">
					<div class='fui-cell-title c' style="color:#fff">您正在进行“一键拆盲盒”操作
					</div>
					<div class='fui-cellone'>
						<div class='fui-cellone-info'>
							<input type='text' class='fui-input' style="width:100%;padding:0.3rem;border-radius:0.3rem" placeholder="要投入积分的额度" ng-model="pagedata.post.alljifen">
						</div>
					</div>
				</div>
				<div class="weui_btn_area" style="margin:1rem 2rem;">
					<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fff;color:#FF4444" ng-click="pagedata.topost2()">确认提交</a>
				</div>
			</div>
		</div>
	</div>
<div ng-if="pagedata.show_xieyi" class="popup">
	<div class="popup-body">
		<div class="popup-center">
			<i class="closed icon icon-cuowu" style="font-size:1.2rem;top:105%;" ng-click="pagedata.show_xieyi=false"></i>
			<div class="content-images" style="padding:0.5rem;height:20rem; overflow-y:scroll;">
					<div class="title bold" style="font-size:0.8rem">活动协议 / <small>Read Ggree</small></div>
					<div class="text" style="padding-top:0.5rem;font-size:0.7rem" ng-bind-html="trust(pagedata.pluginset.xieyi)">
					</div>
			</div>
			<div class="modal-footer">
				<div ng-click="pagedata.show_xieyi=false;pagedata.post.checked=1;pagedata.showbuy=true" class="mod-check" style="width: 100%; margin: 0;">我已阅读</div>
			</div>
		</div>
	</div>
	</div>
	<div ng-include="sys_html('_footer')"></div>
	<div ng-include="sys_html('_red')"></div>
</div>
<script>
scope.pagedata.nowaddress=scope.pagedata.nowaddress?scope.pagedata.nowaddress:{}
if(scope.pagedata.showcanlog==2){
	scope.pagedata.geturl='jy_manghe/xunibi/fenlist/gameid='+scope.pagedata.team.id
}else{
	scope.pagedata.geturl='jy_manghe/game/getlist/'
}
scope.tool.get_list(scope.pagedata.geturl,true);
scope.pagedata.scroll_bottom=function(){
	if(scope.pagedata.showcanlog==2){
		scope.pagedata.geturl='jy_manghe/xunibi/fenlist/gameid='+scope.pagedata.team.id
	}else{
		scope.pagedata.geturl='jy_manghe/game/getlist/'
	}
	scope.tool.get_list(scope.pagedata.geturl);
}
scope.pagedata.upjifen=function(){
	var rewards=scope.pagedata.team.reward;
	var alljifen=0;
	for(var i=0;i<rewards.length;i++){
		if(rewards[i].addjifen>0){
			alljifen +=rewards[i].addjifen*1;
		}
	}
	scope.pagedata.post.alljifen=alljifen;
	scope.$evalAsync();
}
scope.pagedata.topost=function(isyue){
	if(scope.pagedata.post.checked!=1){
		//scope.message('请先阅读《活动协议》！','error');
		//return false;
	}
	scope.post_json('/game/post/',scope.pagedata.team.reward,function(result){
		scope.message('投入成功！','','jy_manghe/game//id='+scope.pagedata.team.id);
		scope.$evalAsync();
	});
}
scope.pagedata.topost2show=function(){
	var rewards=scope.pagedata.team.reward;
	var isxuan=0;
	for(var i=0;i<rewards.length;i++){
		if(rewards[i].isxuan){
			isxuan ++;
		}
	}
	if(isxuan<=0){
		scope.message('请先选择盲盒！','error');
		return false;
	}
	scope.pagedata.post2show=true;
	scope.$evalAsync();
}
scope.pagedata.topost2=function(){
	var rewards=scope.pagedata.team.reward;
	var isxuan=0;
	for(var i=0;i<rewards.length;i++){
		if(rewards[i].isxuan){
			isxuan ++;
		}
	}
	if(isxuan<=0){
		scope.message('请先选择盲盒！','error');
		return false;
	}
	if(!scope.pagedata.post.alljifen || scope.pagedata.post.alljifen<=0){
		scope.message('请先输入要提交的积分！','error');
		return false;
	}
	scope.post_json('/game/post/alljifen='+scope.pagedata.post.alljifen,scope.pagedata.team.reward,function(result){
		scope.pagedata.post2show=false;
		scope.message('投入成功！','','jy_manghe/game//id='+scope.pagedata.team.id);
		scope.$evalAsync();
	});
}
</script>